<template>
  <div class="network" v-if="!isOnline">
    <img :src="PIC_URL + '/tlbypcWeb/paidService/wllj_black.png'" alt="" />
  </div>
</template>

<script>
export default {
  data() {
    return {
      isOnline: navigator.onLine,
    };
  },
  mounted() {
    window.addEventListener("online", () => {
      this.isOnline = true;
    });
    window.addEventListener("offline", () => {
      this.isOnline = false;
    });
  },
};
</script>

<style scoped lang="scss">
.network {
  background: rgba(0, 0, 0, 0.863);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
